package com.argticling.model;

import java.util.List;
import com.argticling.model.privilege.Privilege;

//@Entity
//@Table(name="PROFILE")
public class Profile implements Persistable{

	private List<Privilege> privileges;
    private String id;

    //@Id
    //@Column(name = "id", updatable = false, nullable = false)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

	boolean allowsCreateAdmin(){
		return false;
	}

	boolean allowsCreateUser(){
		return false;
	}

	boolean allowsRead(){
		return false;
	}

	boolean allowsWrite(){
		return false;
	}

	//@ManyToMany(targetEntity=com.argticling.model.privilege.Privilege.class, fetch = FetchType.EAGER)
	//@Column(name= "PROFILE_PRIVILEGES")
	public List<Privilege> getPrivileges() {
		return privileges;
	}

	public void addPrivilege(Privilege privilege) {
		privileges.add(privilege);
	}
}
